<html ng-app="repl">
  <head>
    <script src="/third_party/static/jquery-2.0.3/jquery.min.js"></script>
    <script src="/third_party/static/angularjs-1.2.0-rc.3/angular.min.js"></script>
    <script>
      var GLOBALS = {};
      GLOBALS.language = JSON.parse('{{language|js_string}}');
      GLOBALS.placeholder = JSON.parse('{{placeholder|js_string}}');
      GLOBALS.columns = JSON.parse('{{columns|js_string}}');
      GLOBALS.rows = JSON.parse('{{rows|js_string}}');
      GLOBALS.preCode = JSON.parse('{{preCode|js_string}}');
      GLOBALS.postCode = JSON.parse('{{postCode|js_string}}');
    </script>

    <script type="text/javascript"
            src="/third_party/static/jsrepl/jsrepl.js" id="jsrepl-script">
    </script>
  </head>
  <body>
    <div ng-controller="CodeRepl">
      <div>
        <em>Language: <[language]></em>
      </div>
      <br>
      <form ng-submit="runCode(code)">
        <textarea ng-model="code" placeholder="<[placeholder]>" required autofocus rows="<[rows]>" cols="<[cols]>">
        </textarea>

        <button type="submit">Run</button>
      </form>
    </div>

    <script src="/extensions/widgets/interactive/CodeRepl/static/js/CodeRepl.js">
    </script>
  </body>
</html>
